#ifndef STANDARDMAINDIALOG_H
#define STANDARDMAINDIALOG_H

#include <QWidget>
#include <QTranslator>
#include <QPixmap>

#include <pluginui/pluginui_global.h>
#include <pluginui/activator/GuiPluginActivator.h>
#include <plugin/plugin/PluginContext.h>
#include <plugin/util/AbstractSecurityContextHandler.h>

using namespace antu::plugin;

namespace antu
{
namespace plugin
{
namespace ui
{
class PLUGINUISHARED_EXPORT StandardMainDialog : public QWidget
{
    Q_OBJECT

private:
    PluginContext* m_pContext;
    GuiPluginActivator* m_pActivator;
    QTranslator m_oTranslator;
    PluginVersion m_oVersion;
    QString m_sSerial;
    QPixmap m_oAboutImage;

public:
    StandardMainDialog(PluginContext* pContext, AbstractSecurityContextHandler* pHandler = nullptr, QWidget* parent = nullptr);
    virtual ~StandardMainDialog();

private slots:
    void aboutClicked();
    void pluginListClicked();

protected:
    virtual void closeEvent(QCloseEvent *);

public:
    PluginVersion version() const;
    void setVersion(const PluginVersion& version);
    QString serial() const;
    void setSerial(const QString& serial);
    QPixmap aboutImage() const;
    void setAboutImage(const QPixmap& aboutImage);

};
}
}
}


#endif // STANDARDMAINDIALOG_H
